﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.VisualStudio;
using Microsoft.VisualStudio.Package;
using Microsoft.VisualStudio.TextManager.Interop;

namespace BlunderBrain.VisualStudio.AviSynth
{
    public class AviSynthAuthoringScope : AuthoringScope
    {
        private AviSynthDeclarations m_declarations = new AviSynthDeclarations();
        private AviSynthMethods m_methods = new AviSynthMethods();
        
        public override string GetDataTipText(int line, int col, out TextSpan span)
        {
            span = new TextSpan();
            return null;
        }

        public override Declarations GetDeclarations(IVsTextView view,
                                                     int line,
                                                     int col,
                                                     TokenInfo info,
                                                     ParseReason reason)
        {
            return m_declarations;
        }

        public override string Goto(VSConstants.VSStd97CmdID cmd, IVsTextView textView, int line, int col, out TextSpan span)
        {
            span = new TextSpan();
            return null;
        }

        public override Methods GetMethods(int line, int col, string name)
        {
            return m_methods;
        }

        public void AddDeclaration(AviSynthFunction declaration)
        {
            m_declarations.AddDeclaration(declaration);
        }

        public void AddDeclarations(IEnumerable<AviSynthFunction> declarations)
        {
            m_declarations.AddDeclarations(declarations);
        }

        public void AddMethod(AviSynthFunction method)
        {
            m_methods.AddMethod(method);
        }

    }


}
